<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>优惠券菜单查询</title>
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="StyleSheet" media="all" href="${ctx}/css/combined.css">
<link type="text/css" rel="StyleSheet" media="all" href="${ctx}/css/global.css">
<script type="text/javascript" src="${ctx}/js/calendar.js"></script>
<script type="text/javascript" src="${ctx}/js/calendar-zh.js"></script>
<script type="text/javascript" src="${ctx}/js/calendar-setup.js"></script>
<script type="text/javascript">
    // Hack to avoid bug in jscalendar - JRA-7713
    if (!Calendar._TT["WEEKEND"]) Calendar._TT["WEEKEND"] = "0,6";
    if (!Calendar._TT["DAY_FIRST"]) Calendar._TT["DAY_FIRST"] = "Display %s first";
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<script language="javascript">
	function gotoPage(pageOffset, pageSize) {
			var form = document.getElementsByTagName("form")[0];
			form.elements["pager.offset"].value = pageOffset;
			form.elements["pageSize"].value = pageSize;
			form.submit();
	}
	function callIdtype(){
	    var typeid = document.getElementById("type_id").value;
	    var mrg = document.getElementById("idtype");
		if(typeid>3){
			mrg.style.display="";
		}
		if(typeid<4){
			mrg.style.display="none";
		}
	}
</script>
</head>

<body>
<form action="${ctx}/product/salesList.do" method="post">
<input type="hidden" id="itsMethod" name="method" value="query1"/>
<table align="center" width="700px">
	<tr>
    	<th height="25px" colspan="3">商品排行查询</th>
    </tr>
    <tr>
   	  <td class="td_03">
    		排行名称：
      </td>
    	<td class="td_03"><select id="type_id" name="type_id" onchange="callIdtype()">
    			<option value="0" <logic:equal name="Pageaga" value="0">selected</logic:equal>>--ALL--</option>
    			<option value="1" <logic:equal name="Pageaga" value="1">selected</logic:equal>>数码单反</option>
    			<option value="2" <logic:equal name="Pageaga" value="2">selected</logic:equal>>便携数码相机</option>
    			<option value="3" <logic:equal name="Pageaga" value="3">selected</logic:equal>>镜头</option>
    			<option value="4" <logic:equal name="Pageaga" value="4">selected</logic:equal>>佳能</option>
    			<option value="5" <logic:equal name="Pageaga" value="5">selected</logic:equal>>尼康</option>
    			<option value="6" <logic:equal name="Pageaga" value="6">selected</logic:equal>>索尼</option>
    			<option value="7" <logic:equal name="Pageaga" value="7">selected</logic:equal>>适马</option>
    			<option value="8" <logic:equal name="Pageaga" value="8">selected</logic:equal>>腾龙</option>
    		</select>
    		
    		<select name="idtype" id="idtype" style="display:<logic:notPresent name="Pageagab">none</logic:notPresent>">
			  	<option value="0" <logic:equal name="Pageagab" value="0">selected</logic:equal>>--ALL--</option>
    			<option value="1" <logic:equal name="Pageagab" value="1">selected</logic:equal>>数码单反</option>
    			<option value="2" <logic:equal name="Pageagab" value="2">selected</logic:equal>>便携数码相机</option>
    			<option value="3" <logic:equal name="Pageagab" value="3">selected</logic:equal>>镜头</option>
			</select></td>
    		<td class="td_03"><input type="submit"  class="btn" value="查询" />    	</td>
    </tr>
</table>
<div style="padding:5px 0 5px 20px">
<input type="button"  class="btn" value="添加" onclick="javascript:window.location='${ctx}/pages/safeai/jsp/product/addSalesList.jsp'"/>
</div>
<logic:notEmpty name="salesList" property="records">
	<table align="center" width="98%">
		<tr>
			<th class="td_01" height="25px">排行名称</th>
			<th class="td_01">商品名称</th>
			<th class="td_01">前台显示顺序</th>
			<th class="td_01">操作</th>
		</tr>
		<logic:iterate id="salesList" name="salesList" property="records">
			<tr align="center">
				<td class="td_03">${salesList.type_name}</td>
				<td class="td_03">${salesList.name}</td>
				<td class="td_03">${salesList.seq}</td>
				<td class="td_03"><a href="#" onmousedown="if(confirm('是否删除？')==true) location.href='${ctx}/product/salesList.do?method=del&type_id=${salesList.type_id}&id=${salesList.ID}&seq=${salesList.seq}'">删除</a></td>
			</tr>
		</logic:iterate>
		<tr>
  			<td align="right" colspan="4"><%@ include file="/pages/safeai/jsp/common/page.jsp"%>&nbsp;&nbsp;&nbsp;</td>
  		</tr>
	</table>
</logic:notEmpty>
</form>
</body>
</html>
